'use strict';

const Controller = require('egg').Controller;

class ProductController extends Controller {
  
  async newProduct({
    title,
    content,
    fee,
  }) {
    const n = new this.ctx.model.Product();

    n.user_id = userId;
    n.title = title;
    n.content = content;
    n.fee = fee;

    await n.save();

    return [ n._id ];
  }

}

module.exports = ProductController;
